
package cz.mpelant.msoe.mealchecker.downloader;

import org.apache.http.HttpResponse;

public class DownloadResult {
    public static final int DOWNLOAD_FINISHED = -1;
    public static final int DOWNLOAD_CANCELLED = -2;
    public static final int DOWNLOAD_ERROR = -3;
    private DownloadRequest request;
    // either positive percentage of downloading content or status above
    private int progress;
    private HttpResponse httpResponse;

    public DownloadResult(DownloadRequest request, int progress, HttpResponse httpResponse) {
        super();
        this.request = request;
        this.progress = progress;
        this.httpResponse = httpResponse;
    }

    public DownloadRequest getRequest() {
        return request;
    }

    public void setRequest(DownloadRequest request) {
        this.request = request;
    }

    public int getProgress() {
        return progress;
    }

    public void setProgress(int progress) {
        this.progress = progress;
    }

    public HttpResponse getHttpResponse() {
        return httpResponse;
    }

    public void setHttpResponse(HttpResponse httpResponse) {
        this.httpResponse = httpResponse;
    }

}
